
function androidBackByRole(roleId,url){
			switch(parseInt(roleId)){
			case 0:
				url= "/Home/SaleManager/Head/"+url; //总部
				break;	
			case 1:
				url= "/Home/SaleManager/Salemanager/"+url; //大区经理
				break;
			case 11:
				url= "/Home/SaleManager/Salemanager/"+url; //大区经理助理
				break;
			case 2:
				url= "/Home/SaleManager/Province/"+url;//省总
				break;
			case 3:
				url= "/Home/SaleManager/City/"+url;//地总
				break;
			case 4:
				url= "/Home/SaleManager/County/"+url;//县总
				break;
			case 6:
				url= "/Home/SaleManager/Saledepartment/"+url;//销售部
				break;
			case 7:
				url= "/Home/SaleManager/Career/"+url;//事业部
				break;
			default:url= "/Home/Saleman/Saleman/"+url;//业务员
			}
			return url;
		}

function back_callback() {
	role = $('.h_back_1').attr('data-role-id');
	href = $('.h_back_1').attr('href');
	back=$('.h_back_1').attr('data-back');
	//首页
	index = $('.android_back_class');
	if(index.length>0){
		$('.confir_content').html('您确定退出客户端吗');
        $("#iosDialog_2").show(200);
        return false;
	}
	
	// 表明二级页面
	if (href == 'javascript:' || href == 'javascript:void(0)'
			|| href == 'javascript:void(0);'
			|| href == 'javascript:history.back(-1)') {
		if(role!=null && role!=undefined){
			if(role==11){
				url='/Home/SaleManager/Salemanager/indexassistant';
			}else{
				url=androidBackByRole(role,'index');
			}
			
			window.location.href = url;
			return false;
		}
		if (href == 'javascript:history.back(-1)') {
			history.back(-1);
			return false;
		}
		
		if(back!=null && back.length>0){
			history.back(-1);return false;
		}
		history.back(-1);return false;

	} else {
		window.location.href = href;
	}
}


$('.oks-btn').on('click', function () {
	$("#iosDialog_2").hide(200);
	 key = "退出2";
     window.BSFWebView.showInfoFromJs(key);//退出客户端
});
$('.cancels-btn').on('click', function () {
	$("#iosDialog_2").hide(200);
	return false;
});




